<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match = "/item">
  <table>
    <tr>
      <td colspan="2">
        <div class='icon'>
          <img>
            <xsl:attribute name="src">/gallery/image/<xsl:value-of select="./@photo"/>/?sc=true</xsl:attribute>
          </img>
        </div>
      </td>
    </tr>
  
    <xsl:for-each select="./@*">
      <xsl:if test="name()!='photo'">
        <tr>
          <td>
            <label><xsl:value-of select="name()"/>:</label>
          </td>
          <td>
            <span><xsl:value-of select="."/></span>
          </td>
        </tr>
      </xsl:if>
    </xsl:for-each>
  
    <xsl:for-each select = "./*">
      <tr>
        <td colspan="2">
          <div>
            <xsl:attribute name="class"><xsl:value-of select="name()"/></xsl:attribute>
            <xsl:value-of select="."/>
          </div>
        </td>
      </tr>
    </xsl:for-each>
  </table>
</xsl:template>

<xsl:template match = "/timetable">
  <li>
   <span class='label'><xsl:value-of select="./@day"/>:</span>
   <a><xsl:value-of select="./@from"/> - <xsl:value-of select="./@to"/></a>
  </li>
</xsl:template>

<xsl:template match = "/roster">
    <tr><td>
      <xsl:value-of select="./@girl"/>
      <div style="display:none">
        <xsl:value-of select="./@Monday"/>,
        <xsl:value-of select="./@Tuesday"/>,
        <xsl:value-of select="./@Wednesday"/>,
        <xsl:value-of select="./@Thursday"/>,
        <xsl:value-of select="./@Friday"/>,
        <xsl:value-of select="./@Saturday"/>,
        <xsl:value-of select="./@Sunday"/>
      </div>
    </td></tr>
</xsl:template>

</xsl:stylesheet>
